﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data;
using KPIS.GERP.GHRMS.DAL;
using KPIS.GERP.GHRMS.MODEL;
using KPIS.GERP.GHRMS.IBLL;
using KPIS.GERP.GHRMS.IDAL;

namespace KPIS.GERP.GHRMS.BLL
{
    [Serializable]
    public class CommandTypeBLL : ICommandTypeBLL
    {
        private static readonly CommandTypeDAL DAL = new CommandTypeDAL();

        public DataSet LoadCommandTypes(Nullable<int> Sequence, Nullable<int> Group)
        {
            int Seq = Sequence.HasValue ? (int)Sequence : 0;
            int CmdGroup = Group.HasValue ? (int)Group : 0;
            return DAL.GetCommandTypeInfo(Seq, CmdGroup);
        }
        public void UpdateFormat(int Sequence, string Header, string Format, int UpdatedBy)
        {
            try
            {
                DAL.UpdateFormat(Sequence, Header, Format, UpdatedBy);
            }

            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }        
    }
}
